<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
<title><%@include
		file="/WEB-INF/jsp/admin/public/projectName.jsp"%></title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
<%@include file="/WEB-INF/jsp/admin/public/cssHeader.jsp"%>
<%@include file="/WEB-INF/jsp/admin/public/jsBottom.jsp"%>
</head>
<body class="white-bg">
	<div class="row white-bg">
		<div class="wrapper wrapper-content animated fadeInRight">
			<div class="ibox float-e-margins">
				<!-- row-start -->
				<div class="container col-md-12 column" style="margin-left: 10px;">
					<form id="fromPage"
						action="${pageContext.request.contextPath}/admin/recharge/recharges.html"
						method="get">
						<div class="tab-pane fade active in" id="A">
							<div class="row">
								<div class="form-group col-md-2">
									<div class="input-group date datetimepickeritem"
										data-date-format="yyyy-mm-dd HH:mm"
										data-link-field="dtp_input1">
										<input placeholder="开始时间" name="startTime"
											class="form-control" size="16" type="text"
											value="${startTime }" readonly> <span
											class="input-group-addon"><span
											class="glyphicon glyphicon-remove"></span></span> <span
											class="input-group-addon"><span
											class="glyphicon glyphicon-th"></span></span>
									</div>
								</div>
								<div class="form-group col-md-2">
									<div class="input-group date datetimepickeritem"
										data-date-format="yyyy-mm-dd HH:mm"
										data-link-field="dtp_input1">
										<input placeholder="结束时间" name="endTime" class="form-control"
											size="16" type="text" value="${endTime }" readonly> <span
											class="input-group-addon"><span
											class="glyphicon glyphicon-remove"></span></span> <span
											class="input-group-addon"><span
											class="glyphicon glyphicon-th"></span></span>
									</div>
								</div>

							</div>

							<div class="row">
								<div class="form-group col-md-2">
									<select name="platId" class="form-control">
										<option value="">渠道筛选</option>
										<c:forEach var="item" items="${plats }">
											<c:choose>
												<c:when test="${platId == item.id }">
													<option selected="selected" value="${item.id }">${item.name }</option>
												</c:when>
												<c:otherwise>
													<option value="${item.id }">${item.name }</option>
												</c:otherwise>
											</c:choose>
										</c:forEach>
									</select>
								</div>

								<div class="form-group col-md-2">
									<input name="accountId" value="${accountId }" id="name"
										class="search form-control" placeholder="玩家账号" />
								</div>

								<div class="form-group col-md-2">
									<input name="playerName" value="${playerName }" id="name"
										class="search form-control" placeholder="玩家名称" />
								</div>

								<div class="form-group col-md-2">
									<input name="orderId" value="${orderId }" id="name"
										class="search form-control" placeholder="订单号" />
								</div>

								<div class="form-group col-md-1 ">
									<button type="submit" class="btn btn-primary btn-block">搜索</button>
								</div>
							</div>

						</div>
						<div class="wrapper wrapper-content animated fadeInRight row">
							<div class="col-md-12">
								<div>
									<table class="table table-hover table-bordered">
										<thead>
											<tr>
												<th>订单号</th>
												<th>用户账号</th>
												<th>用户名称</th>
												<th>支付金额</th>
												<th>充值钻石</th>
												<th>支付时间</th>
												<th class="col-md-3">支付url</th>
												<th>用户渠道</th>
											</tr>
										</thead>
										<tbody>
											<c:forEach var="item" items="${pageBean.pageList }">
												<tr>
													<td>${item.orderId }</td>
													<td>${item.accountId }</td>
													<td>${item.playerName }</td>
													<td>${item.money }</td>
													<td>${item.addDiamond }</td>
													<td><fmt:formatDate value="${item.payTime }"
															pattern="yyyy-MM-dd HH:mm" /></td>
													<td>${item.payUrl }</td>
													<td>${item.plat.name }</td>
												</tr>
											</c:forEach>
										</tbody>
									</table>
								</div>
							</div>
							<!-- row-end -->
							<input name="pageNum" value="${pageBean.currentPage}"
								type="hidden" />
						</div>
					</form>
				</div>

			</div>
		</div>

	</div>
	<%@include file="/WEB-INF/jsp/admin/public/pageView.jspf"%>
</body>
</html>

<script>
	$(document).ready(function() {
		$("#defaultForm").validate({
			rules : {
				chain : {
					url : true
				}
			}
		});
	});

	jQuery.extend(jQuery.validator.messages, {
		required : "请填写本字段",
		remote : "验证失败",
		email : "请输入正确的电子邮件",
		url : "请输入正确的网址",
		date : "请输入正确的日期",
		dateISO : "请输入正确的日期 (ISO).",
		number : "请输入正确的数字",
		digits : "请输入正确的整数",
		creditcard : "请输入正确的信用卡号",
		equalTo : "请再次输入相同的值",
		accept : "请输入指定的后缀名的字符串",
		maxlength : jQuery.validator.format("允许的最大长度为 {0} 个字符"),
		minlength : jQuery.validator.format("允许的最小长度为 {0} 个字符"),
		rangelength : jQuery.validator.format("允许的长度为{0}和{1}之间"),
		range : jQuery.validator.format("请输入介于 {0} 和 {1} 之间的值"),
		max : jQuery.validator.format("请输入一个最大为 {0} 的值"),
		min : jQuery.validator.format("请输入一个最小为 {0} 的值")
	});
</script>
<script type="text/javascript">
	$('.datetimepickeritem').datetimepicker({
		autoclose : true,
		startView : "month",
		minView : "day",
		language : "en"
	});
</script>
